The present invention relates to a method for demodulating magnetically recorded data recorded, for example, on cards having a magnetic stripe. It specifically relates to a method for demodulating magnetically recorded data, in which the recorded data can be accurately reproduced through a technique of pattern matching.
A data recording method normally used for magnetic cards is a pulse width modulating method in which data is recorded by a combination of two types of pulses, F and 2F. In recording/reproducing devices such as magnetic card readers that use such a method, a magnetic head is slid relative to a magnetic stripe on a magnetic card to reproduce magnetically recorded data in a form of an analog reproduced signal, and based on the waveform of the analog reproduced signal, the binary data is demodulated, that is, decoded.
Describing in detail, as illustrated in FIG. 1, on a magnetic stripe (magnetic recording surface) 1a of a general magnetic card 1, a sync bit region 4 and a STX (start of text) code region 5 that indicates the beginning of the recorded data are formed before a significant data region 3 in which actual data is contained, and an ETX (end of text) code region 6 that indicates the end of the data, an LRC (longitudinal redundancy check) data region 7, and a sync bit region 8 are formed after the significant data region 3.
As illustrated in FIG. 2, a magnetic card reader 10 for reproducing magnetically recorded data configured in the above manner transports the magnetic card 1 by a transport roller while a magnetic head 11 contacts the magnetic stripe on the magnetic card 1, and whereby the analog reproduced signal corresponding to the magnetically recorded data on the magnetic stripe is obtained.
As illustrated in FIG. 3(a), a recording current waveform for magnetic recording is composed of a combination of pulse signals representing data in binary form. The xe2x80x9czeroxe2x80x9d bit is represented by the longer pulse width and the xe2x80x9conexe2x80x9d bit is represented by the shorter pulse width; in which the shorter pulse width is one half the width of the xe2x80x9czeroxe2x80x9d bit pulse width. FIG. 3(a) illustrates the binary number xe2x80x9c000010xe2x80x9d.
The signal waveform of an analog reproduced signal A obtained by the magnetic head 11 via an amplifier 13 is illustrated in FIG. 3(b) in which rising and dropping points of the recording current waveform appear as positive and negative peaks. The positive and negative peaks of the waveform appear in inverse magnetic polarities of the magnetically recorded data. The analog reproduced signal waveform is supplied to a peak detecting circuit 14 (see FIG. 2) to identify peak positions. Further, through a comparator 15 a digital reproduced signal waveform which corresponds to the recording current waveform as illustrated in FIG. 3(d) is obtained. Based on the digital reproduced signal waveform, the magnetically recorded data is decoded by a control circuit 16 consisting of CPU.
In general use, there are a binary data character code form employing a 5-bit code system (4 data bits and 1 parity bit) or a 7-bit code system (6 data bits and 1 parity bit). Since they can be used substantially in the same manner, the embodiment will be described based on the 5-bit code system.
In the 5-bit code system, sixteen kinds of characters xe2x80x9c0xe2x80x9dxcx9cxe2x80x9cFxe2x80x9d can be expressed. There are odd parity and even parity for the parity bit. In the control circuit 16, bit lines that correspond to the sixteen kinds of characters are pre-stored in memory, and the reproduced binary data is compared by 5 bits with the bit lines to reproduce the data.
The data reading performance of a recording/reproducing device for a magnetic card, for example, is affected by the condition of the magnetic recording medium, contamination and wear of the magnetic head, mechanical noise, etc.
A magnetic card, which is a magnetic recording medium, generally receives various stresses over repetitive use. Due to contamination or scratches on the recording surface of the magnetic card, for example, the signal reproduced by the magnetic head may present the waveform including peaks that do not exist originally. Also, the magnetization on the recording surface tends to degrade over time. It is especially likely that the magnetic recording medium used for many years after manufacturing loses the magnetic intensity which is necessary for signal reproduction.
Furthermore, as the magnetic head wears out, its resolving power decreases, possibly causing peak shifts in the waveform of the reproduced signal. Also, the peak positions may be shifted depending on the frequency property of the reproducing circuit.
In a conventional reproducing method, the peaks of the analog reproduced signal waveform are detected, based on which binary data is identified as xe2x80x9c0xe2x80x9d or xe2x80x9c1xe2x80x9d. To avoid the influence of peak shift, as illustrated in FIG. 4(a), a constant reference time xcex1T (i.e., xcex1=0.7) is set with respect to a time interval T of the reproduced signal waveform which is equivalent to 1-bit of the binary data. The data bit xe2x80x9c0xe2x80x9d or xe2x80x9c1xe2x80x9d is determined by observing whether the inversion of the signal polarity exists within the reference time.
In the conventional method, however, when abnormal peaks (not corresponding to the recorded data) appear in the reproduced signal waveform due to the influence of noise, etc., the recorded data cannot be read accurately, resulting in inaccurate regeneration of the recorded data.
As illustrated in FIG. 4(a), for example, when the character code expressed by the 5-bit code system is recorded, if abnormal peaks as shown by a solid line in FIG. 4(b) appear, the original character code xe2x80x9c10000xe2x80x9d is reproduced as xe2x80x9c10011xe2x80x9d.
Considering the above problem, an object of the present invention is to provide a technique for demodulating magnetically recorded data in which, even when abnormal peaks appear in the reproduced signal waveform, the magnetically recorded data can be accurately reproduced.
In brief, this invention is directed to a pattern matching technique of comparing detected magnetically recorded characters from a magnetic stripe against a set of predetermined idealized reference signals representing characters. Based on the greatest degree of correlation, the appropriate reference character is designated as the character represented by the detected character.
The detected signal is divided into a plurality of segments, each segment has a width equal to one character. In order to compensate for distortions, each signal segment being tested is composed not only of the target segment but also slightly shifted segments. The one of the reference characters which correlates most highly with any one of the related segments is the character designated as the one represented by the signal segment. Techniques for detecting the segment starting position and for normalizing the segment width are also employed to enhance accuracy of character designation.